import api from './auth';

// 获取景点详情
export const getAttractionById = (attractionId) => {
  return api.get(`/attraction/detail/${attractionId}`);
};

// 分页获取景点列表
export const getAttractionList = (params) => {
  return api.get('/attraction/list', { params });
};

// 添加景点
export const addAttraction = (data) => {
  return api.post('/attraction/add', data);
};

// 更新景点信息
export const updateAttraction = (data) => {
  return api.post('/attraction/update', data);
};

// 删除景点
export const deleteAttraction = (attractionId) => {
  return api.delete(`/attraction/${attractionId}`);
};

// 获取推荐景点
export const getRecommendAttractions = (params) => {
  return api.get('/attraction/recommend', { params });
};

// 上传景点封面图片
export const uploadAttractionCover = (formData) => {
  return api.post('/file/attraction', formData, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
};

// 上传景点图片集
export const uploadAttractionGallery = (formData) => {
  return api.post('/file/attraction', formData, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}; 